package com.star.banner.struct;

import com.star.banner.dto.BannerSaveDTO;
import com.star.banner.dto.BannerUpdateDTO;
import com.star.banner.entity.Banner;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author lintianyi
 * @version 1.0
 * @date 2024/6/28 17:00
 */
@Mapper
public interface BannerStruct {
    BannerStruct INSTANCE = Mappers.getMapper(BannerStruct.class);

    /**
     * 保存banner
     * @param dto
     * @return
     */
    Banner to (BannerSaveDTO dto);

    /**
     * 更新
     * @param dto
     * @return
     */
    Banner to (BannerUpdateDTO dto);

}
